package com.houweishi.module.subscribepattern.service.impl;

import java.util.List;
import com.houweishi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.houweishi.module.subscribepattern.mapper.BizSubscribePatternMapper;
import com.houweishi.module.subscribepattern.domain.BizSubscribePattern;
import com.houweishi.module.subscribepattern.service.IBizSubscribePatternService;

/**
 * 申请表类型管理Service业务层处理
 * 
 * @author houweishi
 * @date 2023-02-27
 */
@Service
public class BizSubscribePatternServiceImpl implements IBizSubscribePatternService 
{
    @Autowired
    private BizSubscribePatternMapper bizSubscribePatternMapper;

    /**
     * 查询申请表类型管理
     * 
     * @param id 申请表类型管理主键
     * @return 申请表类型管理
     */
    @Override
    public BizSubscribePattern selectBizSubscribePatternById(Long id)
    {
        return bizSubscribePatternMapper.selectBizSubscribePatternById(id);
    }

    /**
     * 查询申请表类型管理列表
     * 
     * @param bizSubscribePattern 申请表类型管理
     * @return 申请表类型管理
     */
    @Override
    public List<BizSubscribePattern> selectBizSubscribePatternList(BizSubscribePattern bizSubscribePattern)
    {
        return bizSubscribePatternMapper.selectBizSubscribePatternList(bizSubscribePattern);
    }

    /**
     * 新增申请表类型管理
     * 
     * @param bizSubscribePattern 申请表类型管理
     * @return 结果
     */
    @Override
    public int insertBizSubscribePattern(BizSubscribePattern bizSubscribePattern)
    {
        bizSubscribePattern.setCreateTime(DateUtils.getNowDate());
        return bizSubscribePatternMapper.insertBizSubscribePattern(bizSubscribePattern);
    }

    /**
     * 修改申请表类型管理
     * 
     * @param bizSubscribePattern 申请表类型管理
     * @return 结果
     */
    @Override
    public int updateBizSubscribePattern(BizSubscribePattern bizSubscribePattern)
    {
        bizSubscribePattern.setUpdateTime(DateUtils.getNowDate());
        return bizSubscribePatternMapper.updateBizSubscribePattern(bizSubscribePattern);
    }

    /**
     * 批量删除申请表类型管理
     * 
     * @param ids 需要删除的申请表类型管理主键
     * @return 结果
     */
    @Override
    public int deleteBizSubscribePatternByIds(Long[] ids)
    {
        return bizSubscribePatternMapper.deleteBizSubscribePatternByIds(ids);
    }

    /**
     * 删除申请表类型管理信息
     * 
     * @param id 申请表类型管理主键
     * @return 结果
     */
    @Override
    public int deleteBizSubscribePatternById(Long id)
    {
        return bizSubscribePatternMapper.deleteBizSubscribePatternById(id);
    }
}
